Greibach Normal Form Transformation, Revisited

نویسندگان

  • Robert Koch
  • Norbert Blum
چکیده

We develop a new method for placing a given context-free grammar into Greibach normal form with only polynomial increase of its size. Starting with an arbitrary "-free context-free grammar G, we transform G into an equivalent context-free grammar H in extended Greibach normal form; i.e., in addition to rules, fulllling the Greibach normal form properties, the grammar can have chain rules. The size of H will be O(jGj 3), where jGj is the size of G. Moreover, in the case that G is chain rule free, H will be already in Greibach normal form. If H is not chain rule free then we use the standard method for chain rule elimination for the transformation of H into Greibach normal form. The size of the constructed grammar is O(jGj 4).

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Grammar Functors and Covers: from Non-left-recursive to Greibach Normal Form Grammars

ANTON NIJHOLT Abstract. Attention is paid to structure preserving properties of transformations from a non-leftrecursive context-free grammar to a Greibach normal form grammar. It is demonstrated that such a transformation cannot only be ambiguity preserving, but also both cover and functor relations between grammars or their associated syntax-categories can be obtained from such a transformation.

متن کامل

A Simple Transformation for Offline-Parsable Grammars and its Termination Properties

We present, in easily reproducible terms, a simple transformation for offline-parsable grammars which results in a provably terminating parsing program directly top-down interpretable in Prolog. The transformation consists in two steps: (1) removal of empty-productions, followed by: (2) left-recursion elimination. It is related both to left-corner parsing (where the grammar is compiled, rather ...

متن کامل

An Elementary Proof of Double Greibach Normal Form

In [1,6,7] elementary proofs are given of Greibach Normal Form of context-free grammars [4]. Here we do the same for Double Greibach Normal Form, where it is required that each right-hand side of a production both starts and ends with a terminal symbol [5]. In [5], first a grammar in Greibach Normal Form is constructed, which is then transformed into Double Greibach Normal Form; both transforma...

متن کامل

Several Aspects of Context Freeness for Hyperedge Replacement Grammars

In this paper we survey several aspects related to normal forms of hyperedge replacement grammars. Considering context free hyperedge replacement grammars we introduce, inspired by string grammars, Chomsky Normal Form and Greibach Normal Form. The algorithm of conversion is quite the same with the algorithm for string grammars. The important difference is related to the fact that hyperedge gram...

متن کامل

Generating all permutations by context-free grammars in Greibach normal form

We consider context-free grammars Gn in Greibach normal form and, particularly, in Greibach m-form (m = 1, 2) which generates the finite language Ln of all n! strings that are permutations of n different symbols (n ≥ 1). These grammars are investigated with respect to their descriptional complexity, i.e., we determine the number of nonterminal symbols and the number of production rules of Gn as...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Inf. Comput.

دوره 150  شماره 

صفحات  -

تاریخ انتشار 1997